package cn.wyl.pet.controller;

import cn.wyl.pet.domain.PetType;
import cn.wyl.pet.service.PetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/petType")
public class PetTypeController {

    @Autowired
    private PetTypeService service;


    @GetMapping("/typeTree")
    public List<PetType> deptTree(){
        return service.typeTree();
    }


}
